diff --git a/core/authorize.php b/core/authorize.php
index b44c1215cfb66c773f739184f784cd112b667770..8b44e369bfa0e9763d4e448830e0ba4f7acb3bea 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -109,8 +109,8 @@ function authorize_access_allowed() {
     }
     else {
       $links = array_merge($links, array(
-        l(t('Administration pages'), 'admin'),
-        l(t('Front page'), '<front>'),
+        \Drupal::l(t('Administration pages'), 'system.admin'),
+        \Drupal::l(t('Front page'), '<front>'),
       ));
     }
 
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index e7ec8df06ed85a5639d8ad9894b98e3f7ba9fd24..c726d07299ad69a62becf9b0e81fbf86f3e80dcd 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -948,7 +948,7 @@ function template_preprocess_status_messages(&$variables) {
  * class. I.e. we cannot yet convert this jQuery selector to a CSS selector:
  *   jQuery('li:has("a.active")')
  *
- * @see l()
+ * @see \Drupal\Core\Utility\LinkGenerator
  * @see \Drupal\Core\Utility\LinkGenerator::generate()
  * @see system_page_build()
  */
diff --git a/core/lib/Drupal/Component/Utility/UrlHelper.php b/core/lib/Drupal/Component/Utility/UrlHelper.php
index 0c0e07dd2e89deb07c26a9f3ceb9ec10c80cbc4f..cf87435ebe42eef36246ee25f19c2950207db794 100644
--- a/core/lib/Drupal/Component/Utility/UrlHelper.php
+++ b/core/lib/Drupal/Component/Utility/UrlHelper.php
@@ -133,7 +133,7 @@ public static function filterQueryParameters(array $query, array $exclude = arra
    *   - query: An array of query parameters from $url, if they exist.
    *   - fragment: The fragment component from $url, if it exists.
    *
-   * @see l()
+   * @see \Drupal\Core\Utility\LinkGenerator
    * @see url()
    * @see http://tools.ietf.org/html/rfc3986
    *
diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php
index acc3028f03de6da620b76f7205d879a6b9152cf2..3d3dd4110f6e61a5c9b9a20067bda411d8531a67 100644
--- a/core/lib/Drupal/Core/Updater/Module.php
+++ b/core/lib/Drupal/Core/Updater/Module.php
@@ -98,9 +98,9 @@ public function getSchemaUpdates() {
    */
   public function postInstallTasks() {
     return array(
-      l(t('Install another module'), 'admin/modules/install'),
-      l(t('Enable newly added modules'), 'admin/modules'),
-      l(t('Administration pages'), 'admin'),
+      \Drupal::l(t('Install another module'), 'update.module_install'),
+      \Drupal::l(t('Enable newly added modules'), 'system.modules_list'),
+      \Drupal::l(t('Administration pages'), 'system.admin'),
     );
   }
 
diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php
index 7e17dddb1eab384459662bdfc39ea2fa60939556..0f1ea5bf5315532d1bc2fae6b3c6a7eac15873fc 100644
--- a/core/lib/Drupal/Core/Updater/Theme.php
+++ b/core/lib/Drupal/Core/Updater/Theme.php
@@ -82,8 +82,8 @@ public function postInstall() {
    */
   public function postInstallTasks() {
     return array(
-      l(t('Install newly added themes'), 'admin/appearance'),
-      l(t('Administration pages'), 'admin'),
+      \Drupal::l(t('Install newly added themes'), 'system.themes_page'),
+      \Drupal::l(t('Administration pages'), 'system.admin'),
     );
   }
 }
diff --git a/core/modules/aggregator/src/Controller/AggregatorController.php b/core/modules/aggregator/src/Controller/AggregatorController.php
index c11e70ea99d12385d579f196d7eb5898edadf7d2..0f7080050852ea1cda995a39083b106cae22230c 100644
--- a/core/modules/aggregator/src/Controller/AggregatorController.php
+++ b/core/modules/aggregator/src/Controller/AggregatorController.php
@@ -121,7 +121,7 @@ public function adminOverview() {
     $rows = array();
     foreach ($feeds as $feed) {
       $row = array();
-      $row[] = l($feed->label(), "aggregator/sources/" . $feed->id());
+      $row[] = $this->getLinkGenerator()->generateFromUrl($feed->label(), $feed->urlInfo());
       $row[] = $this->dateFormatter->formatInterval($entity_manager->getStorage('aggregator_item')->getItemCount($feed), '1 item', '@count items');
       $last_checked = $feed->getLastCheckedTime();
       $refresh_rate = $feed->getRefreshRate();
diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php
index 1832cb5ad86b0cea9a60e123288c0161f0659ef2..71acbbd57b0744bcbccec385710cebdf848db1b3 100644
--- a/core/modules/aggregator/src/FeedForm.php
+++ b/core/modules/aggregator/src/FeedForm.php
@@ -70,7 +70,7 @@ public function save(array $form, FormStateInterface $form_state) {
       $form_state->setRedirectUrl($feed->urlInfo('canonical'));
     }
     else {
-      $this->logger('aggregator')->notice('Feed %feed added.', array('%feed' => $feed->label(), 'link' => l($this->t('View'), 'admin/config/services/aggregator')));
+      $this->logger('aggregator')->notice('Feed %feed added.', array('%feed' => $feed->label(), 'link' => \Drupal::l($this->t('View'), 'aggregator.admin_overview')));
       drupal_set_message($this->t('The feed %feed has been added.', array('%feed' => $feed->label())));
     }
   }
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index bcf550123d27d2b07e5ddb22c1ab4d6a0c190034..2b6d8bd4fd981d8e817b7e4de7eeeaafca081974 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -41,7 +41,7 @@ function block_help($route_name, RouteMatchInterface $route_match) {
     $demo_theme = $route_match->getParameter('theme') ?: \Drupal::config('system.theme')->get('default');
     $themes = list_themes();
     $output = '<p>' . t('This page provides a drag-and-drop interface for adding a block to a region, and for controlling the order of blocks within regions. To add a block to a region, or to configure its specific title and visibility settings, click the block title under <em>Place blocks</em>. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page.') . '</p>';
-    $output .= '<p>' . l(t('Demonstrate block regions (!theme)', array('!theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '</p>';
+    $output .= '<p>' . \Drupal::l(t('Demonstrate block regions (!theme)', array('!theme' => $themes[$demo_theme]->info['name'])), 'block.admin_demo', array('theme' => $demo_theme)) . '</p>';
     return $output;
   }
 }
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 861ed7321b1e90c934560533ea28b843947fd70f..5fd5d2108ae1ee4467e5ff4d175538430c14a337 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -518,7 +518,10 @@ function theme_book_link(array $variables) {
     $sub_menu = drupal_render($element['#below']);
   }
   $element['#localized_options']['set_active_class'] = TRUE;
-  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
+  /** @var \Drupal\Core\Url $url */
+  $url = $element['#url'];
+  $url->setOptions($element['#localized_options'] + $url->getOptions());
+  $output = \Drupal::linkGenerator()->generateFromUrl($element['#title'], $url);
   return '<li' . new Attribute($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
 }
 
diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php
index 7d43f1fa8a8538ff5276fd6f509bd89288f0b385..efab6410e40e3518681081ab5ae23434fedb9ace 100644
--- a/core/modules/book/src/BookManager.php
+++ b/core/modules/book/src/BookManager.php
@@ -99,7 +99,7 @@ protected function loadBooks() {
       foreach ($book_links as $link) {
         $nid = $link['nid'];
         if (isset($nodes[$nid]) && $nodes[$nid]->status) {
-          $link['link_path'] = 'node/' . $nid;
+          $link['url'] = $nodes[$nid]->urlInfo();
           $link['title'] = $nodes[$nid]->label();
           $link['type'] = $nodes[$nid]->bundle();
           $this->books[$link['bid']] = $link;
@@ -528,7 +528,7 @@ public function bookTreeOutput(array $tree) {
       $element['#attributes']['class'] = $class;
       $element['#title'] = $data['link']['title'];
       $node = $this->entityManager->getStorage('node')->load($data['link']['nid']);
-      $element['#href'] = $node->url();
+      $element['#url'] = $node->urlInfo();
       $element['#localized_options'] = !empty($data['link']['localized_options']) ? $data['link']['localized_options'] : array();
       $element['#below'] = $data['below'] ? $this->bookTreeOutput($data['below']) : $data['below'];
       $element['#original_link'] = $data['link'];
diff --git a/core/modules/book/src/Controller/BookController.php b/core/modules/book/src/Controller/BookController.php
index 305a0b9ffbe8bd42df07ce95a4141ad9d9d33445..dd467b96652830972e319173835921dab2d7565e 100644
--- a/core/modules/book/src/Controller/BookController.php
+++ b/core/modules/book/src/Controller/BookController.php
@@ -9,7 +9,7 @@
 
 use Drupal\book\BookExport;
 use Drupal\book\BookManagerInterface;
-use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
+use Drupal\Core\Controller\ControllerBase;
 use Drupal\node\NodeInterface;
 use Symfony\Component\DependencyInjection\Container;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -19,7 +19,7 @@
 /**
  * Controller routines for book routes.
  */
-class BookController implements ContainerInjectionInterface {
+class BookController extends ControllerBase {
 
   /**
    * The book manager.
@@ -71,8 +71,13 @@ public function adminOverview() {
     $headers = array(t('Book'), t('Operations'));
     // Add any recognized books to the table list.
     foreach ($this->bookManager->getAllBooks() as $book) {
+      /** @var \Drupal\Core\Url $url */
+      $url = $book->urlInfo();
+      if (isset($book['options'])) {
+        $url->setOptions($book['options']);
+      }
       $row = array(
-        l($book['title'], $book['link_path'], isset($book['options']) ? $book['options'] : array()),
+        $this->getLinkGenerator()->generateFromUrl($book['title'], $url),
       );
       $links = array();
       $links['edit'] = array(
@@ -105,7 +110,7 @@ public function adminOverview() {
   public function bookRender() {
     $book_list = array();
     foreach ($this->bookManager->getAllBooks() as $book) {
-      $book_list[] = l($book['title'], $book['link_path']);
+      $book_list[] = $this->getLinkGenerator()->generateFromUrl($book['title'], $book['url']);
     }
     return array(
       '#theme' => 'item_list',
diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php
index 9a2b754f743f8c4768471f5f556f7a8b42b498d7..973f44a467dedaa21b146aade93a78ec5f718d27 100644
--- a/core/modules/book/src/Form/BookAdminEditForm.php
+++ b/core/modules/book/src/Form/BookAdminEditForm.php
@@ -121,7 +121,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
           $node->book['link_title'] = $values['title'];
           $node->setNewRevision();
           $node->save();
-          $this->logger('content')->notice('book: updated %title.', array('%title' => $node->label(), 'link' => l($this->t('View'), 'node/' . $node->id())));
+          $this->logger('content')->notice('book: updated %title.', array('%title' => $node->label(), 'link' => $this->getLinkGenerator()->generateFromUrl($this->t('View'), $node->urlInfo())));
         }
       }
     }
diff --git a/core/modules/book/src/Tests/BookTest.php b/core/modules/book/src/Tests/BookTest.php
index fff81f56a1586696200bba101a1c0f8f01a3ead3..335e6b5f7d5487fdea84fafc089af2e880734cb0 100644
--- a/core/modules/book/src/Tests/BookTest.php
+++ b/core/modules/book/src/Tests/BookTest.php
@@ -187,15 +187,24 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F
 
     // Check previous, up, and next links.
     if ($previous) {
-      $this->assertRaw(l('<b>‹</b> ' . $previous->label(), 'node/' . $previous->id(), array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page')))), 'Previous page link found.');
+      /** @var \Drupal\Core\Url $url */
+      $url = $previous->urlInfo();
+      $url->setOptions(array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page'))));
+      $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl('<b>‹</b> ' . $previous->label(), $url), 'Previous page link found.');
     }
 
     if ($up) {
-      $this->assertRaw(l('Up', 'node/' . $up->id(), array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page')))), 'Up page link found.');
+      /** @var \Drupal\Core\Url $url */
+      $url = $up->urlInfo();
+      $url->setOptions(array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page'))));
+      $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl('Up', $url), 'Up page link found.');
     }
 
     if ($next) {
-      $this->assertRaw(l($next->label() . ' <b>›</b>', 'node/' . $next->id(), array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page')))), 'Next page link found.');
+      /** @var \Drupal\Core\Url $url */
+      $url = $next->urlInfo();
+      $url->setOptions(array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page'))));
+      $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($next->label() . ' <b>›</b>', $url), 'Next page link found.');
     }
 
     // Compute the expected breadcrumb.
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 5b1ed9b4db6ed4bb7602f47a6233d3927c408b02..d838125b396f6c0e756bdf3e21166dd54734af0b 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -727,8 +727,8 @@ function template_preprocess_comment(&$variables) {
     $variables['signature'] = '';
   }
   if (isset($comment->in_preview)) {
-    $variables['title'] = l($comment->getSubject(), '');
-    $variables['permalink'] = l(t('Permalink'), '');
+    $variables['title'] = \Drupal::l($comment->getSubject(), '<front>');
+    $variables['permalink'] = \Drupal::l(t('Permalink'), '<front>');
   }
   else {
     $uri = $comment->urlInfo();
diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php
index 32ed795d2b6e2267ed1d95faa7eb6c7b76556225..84f1dcefc71350b28db8616439d4979ec988150c 100644
--- a/core/modules/comment/src/CommentForm.php
+++ b/core/modules/comment/src/CommentForm.php
@@ -370,7 +370,10 @@ public function save(array $form, FormStateInterface $form_state) {
       $form_state->setValue('cid', $comment->id());
 
       // Add a log entry.
-      $logger->notice('Comment posted: %subject.', array('%subject' => $comment->getSubject(), 'link' => l(t('View'), 'comment/' . $comment->id(), array('fragment' => 'comment-' . $comment->id()))));
+      $logger->notice('Comment posted: %subject.', array(
+          '%subject' => $comment->getSubject(),
+          'link' => $this->getLinkGenerator()->generateFromUrl(t('View'), $comment->urlInfo()->setOption('fragment', 'comment-' . $comment->id()))
+        ));
 
       // Explain the approval queue if necessary.
       if (!$comment->isPublished()) {
diff --git a/core/modules/content_translation/src/Controller/ContentTranslationController.php b/core/modules/content_translation/src/Controller/ContentTranslationController.php
index 93b4887cc8cda954007635e8734bf227f01dca7b..991d51c5ce4b40c805eceb03047f7ef90fcb1611 100644
--- a/core/modules/content_translation/src/Controller/ContentTranslationController.php
+++ b/core/modules/content_translation/src/Controller/ContentTranslationController.php
@@ -122,11 +122,13 @@ public function overview(Request $request, $entity_type_id = NULL) {
           $source = isset($entity->translation[$langcode]['source']) ? $entity->translation[$langcode]['source'] : '';
           $is_original = $langcode == $original;
           $label = $entity->getTranslation($langcode)->label();
-          $link = isset($links->links[$langcode]['href']) ? $links->links[$langcode] : array('href' => $entity->getSystemPath());
-          $link += array('language' => $language);
-          $row_title = l($label, $link['href'], $link);
+          $link = isset($links->links[$langcode]['url']) ? $links->links[$langcode] : array('url' => $entity->urlInfo());
+          if (!empty($link['url'])) {
+            $link['url']->setOption('language', $language);
+            $row_title = $this->getLinkGenerator()->generateFromUrl($label, $link['url']);
+          }
 
-          if (empty($link['href'])) {
+          if (empty($link['url'])) {
             $row_title = $is_original ? $label : $this->t('n/a');
           }
 
@@ -134,10 +136,7 @@ public function overview(Request $request, $entity_type_id = NULL) {
           // the entity form, otherwise if we are not dealing with the original
           // language we point the link to the translation form.
           if ($entity->access('update')) {
-            $links['edit'] = array(
-              'href' => $entity->getSystemPath('edit-form'),
-              'language' => $language,
-            );
+            $links['edit'] = $entity->urlInfo('edit-form')->toArray() + ['language' => $language];
           }
           elseif (!$is_original && $handler->getTranslationAccess($entity, 'update')->isAllowed()) {
             $links['edit'] = $edit_url->toArray();
diff --git a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
index e78a194e305e1e427a0c7d243af52b385905c6de..aa038825118430d9398f469a965d76240f831f9c 100644
--- a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
+++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
@@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
         'default_date' => array(
           '#type' => 'textfield',
           '#title' => t('Relative default value'),
-          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See !strtotime for more details.", array('!strtotime' => l('strtotime', 'http://www.php.net/manual/en/function.strtotime.php'))),
+          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"@url\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime', '@url' => 'http://www.php.net/manual/en/function.strtotime.php')),
           '#default_value' => (isset($default_value[0]['default_date_type']) && $default_value[0]['default_date_type'] == static::DEFAULT_VALUE_CUSTOM) ? $default_value[0]['default_date'] : '',
           '#states' => array(
             'visible' => array(
diff --git a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
index 59eb7fc0faca0548adc37f986c7f8211c36e39f6..7878f00a7d3da07b34ffb33ff261d386b83c6a4f 100644
--- a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
@@ -40,6 +40,9 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
   protected function setUp() {
     parent::setUp();
 
+    // Rebuild the router, otherwise we can't generate links.
+    $this->container->get('router.builder')->rebuild();
+
     $this->installSchema('dblog', array('watchdog'));
 
     ViewTestData::createTestViews(get_class($this), array('dblog_test_views'));
@@ -57,12 +60,12 @@ public function testIntegration() {
     // Setup a watchdog entry without tokens.
     $entries[] = array(
       'message' => $this->randomMachineName(),
-      'variables' => array('link' => l('Link', 'node/1')),
+      'variables' => array('link' => \Drupal::l('Link', '<front>')),
     );
     // Setup a watchdog entry with one token.
     $entries[] = array(
       'message' => '@token1',
-      'variables' => array('@token1' => $this->randomMachineName(), 'link' => l('Link', 'node/2')),
+      'variables' => array('@token1' => $this->randomMachineName(), 'link' => \Drupal::l('Link', '<front>')),
     );
     // Setup a watchdog entry with two tokens.
     $entries[] = array(
@@ -72,7 +75,7 @@ public function testIntegration() {
       'variables' => array(
         '@token1' => $this->randomMachineName(),
         '!token2' => $this->randomMachineName(),
-        'link' => l('<object>Link</object>', 'node/2', array('html' => TRUE)),
+        'link' => \Drupal::l('<object>Link</object>', '<front>'),
       ),
     );
     $logger_factory = $this->container->get('logger.factory');
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index a16a06b90e12482043962031271770958a99981e..118e504dce9fdb5decbd5f8688328e4c04b4c923 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -86,7 +86,7 @@ function field_help($route_name, RouteMatchInterface $route_match) {
         if (isset($info[$provider]['name'])) {
           $display = $info[$provider]['name'];
           if (\Drupal::moduleHandler()->implementsHook($provider, 'help')) {
-            $items[] = l($display, 'admin/help/' . $provider);
+            $items[] = \Drupal::l($display, 'help.page', array('name' => $provider));
           }
           else {
             $items[] = $display;
diff --git a/core/modules/filter/src/Element/TextFormat.php b/core/modules/filter/src/Element/TextFormat.php
index 35d2bdfd7d22fccead64505e49ea50b0eb0a6c0a..14b03d7435f782a6033ecd2357ece23dc8a92d72 100644
--- a/core/modules/filter/src/Element/TextFormat.php
+++ b/core/modules/filter/src/Element/TextFormat.php
@@ -179,7 +179,7 @@ public static function processFormat(&$element, FormStateInterface $form_state,
     $element['format']['help'] = array(
       '#type' => 'container',
       '#attributes' => array('class' => array('filter-help')),
-      '#markup' => l(t('About text formats'), 'filter/tips', array('attributes' => array('target' => '_blank'))),
+      '#markup' => \Drupal::l(t('About text formats'), 'filter.tips_all', array(), array('attributes' => array('target' => '_blank'))),
       '#weight' => 0,
     );
 
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 2d683ae5fa22c7f9eb3fbc86bb197aa8bd515449..f81f6a8dbe5e300fddc063f6b2d47a3d50f23042 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -536,11 +536,11 @@ function template_preprocess_forums(&$variables) {
         if ($variables['tid'] != $topic->forum_tid) {
           $variables['topics'][$id]->moved = TRUE;
           $variables['topics'][$id]->title = String::checkPlain($topic->getTitle());
-          $variables['topics'][$id]->message = l(t('This topic has been moved'), "forum/$topic->forum_tid");
+          $variables['topics'][$id]->message = \Drupal::l(t('This topic has been moved'), 'forum.page', ['taxonomy_term' => $topic->forum_tid]);
         }
         else {
           $variables['topics'][$id]->moved = FALSE;
-          $variables['topics'][$id]->title_link = l($topic->getTitle(), 'node/' . $topic->id());
+          $variables['topics'][$id]->title_link = \Drupal::linkGenerator()->generateFromUrl($topic->getTitle(), $topic->urlInfo());
           $variables['topics'][$id]->message = '';
         }
         $forum_submitted = array('#theme' => 'forum_submitted', '#topic' => (object) array(
diff --git a/core/modules/forum/src/Form/ForumForm.php b/core/modules/forum/src/Form/ForumForm.php
index 8ee5f435f7e5fa26c5fbd8383456305ed1cbd7e7..eaa6e09592a79b517df8ea7e85e1e45938d0c014 100644
--- a/core/modules/forum/src/Form/ForumForm.php
+++ b/core/modules/forum/src/Form/ForumForm.php
@@ -79,16 +79,19 @@ public function save(array $form, FormStateInterface $form_state) {
     $term_storage = $this->entityManager->getStorage('taxonomy_term');
     $status = $term_storage->save($term);
 
+    $route_name = $this->urlStub == 'container' ? 'forum.edit_container' : 'forum.edit_forum';
+    $route_parameters  = ['taxonomy_term' => $term->id()];
+    $link = \Drupal::l($this->t('Edit'), $route_name, $route_parameters);
     switch ($status) {
       case SAVED_NEW:
         drupal_set_message($this->t('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType)));
-        $this->logger('forum')->notice('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => l($this->t('Edit'), 'admin/structure/forum/edit/' . $this->urlStub . '/' . $term->id())));
+        $this->logger('forum')->notice('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => $link));
         $form_state->setValue('tid', $term->id());
         break;
 
       case SAVED_UPDATED:
         drupal_set_message($this->t('The @type %term has been updated.', array('%term' => $term->getName(), '@type' => $this->forumFormType)));
-        $this->logger('forum')->notice('Updated @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => l($this->t('Edit'), 'admin/structure/forum/edit/' . $this->urlStub . '/' . $term->id())));
+        $this->logger('forum')->notice('Updated @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => $link));
         break;
     }
 
diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
index d1736993f980ffd62113f9a2c35f8ef990817351..1e8fd61ac03c9b5dc4c125a2c8c98ee5d8e2d71e 100644
--- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
@@ -85,7 +85,7 @@ function _testImageFieldFormatters($scheme) {
       '#width' => 40,
       '#height' => 20,
     );
-    $default_output = l($image, file_create_url($image_uri), array('html' => TRUE));
+    $default_output = '<a href="' . file_create_url($image_uri) . '">' . drupal_render($image) . '</a>';
     $this->drupalGet('node/' . $nid);
     $cache_tags_header = $this->drupalGetHeader('X-Drupal-Cache-Tags');
     $this->assertTrue(!preg_match('/ image_style\:/', $cache_tags_header), 'No image style cache tag found.');
diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install
index a9efce991824711f5d1cb4a99f543d1273b8d79e..c4a924694c47c5f59e991dca75b3e56b345d0618 100644
--- a/core/modules/locale/locale.install
+++ b/core/modules/locale/locale.install
@@ -260,7 +260,7 @@ function locale_requirements($phase) {
           if ($available_updates) {
             $requirements['locale_translation'] = array(
               'title' => 'Translation update status',
-              'value' => l(t('Updates available'), 'admin/reports/translations'),
+              'value' => \Drupal::l(t('Updates available'), 'locale.translate_status'),
               'severity' => REQUIREMENT_WARNING,
               'description' => t('Updates available for: @languages. See the <a href="@updates">Available translation updates</a> page for more information.', array('@languages' => implode(', ', $available_updates), '@updates' => \Drupal::url('locale.translate_status'))),
             );
@@ -285,7 +285,7 @@ function locale_requirements($phase) {
       else {
         $requirements['locale_translation'] = array(
           'title' => 'Translation update status',
-          'value' => l(t('Can not determine status'), 'admin/reports/translations'),
+          'value' => \Drupal::l(t('Can not determine status'), 'locale.translate_status'),
           'severity' => REQUIREMENT_WARNING,
           'description' => t('No translation status is available. See the <a href="@updates">Available translation updates</a> page for more information.', array('@updates' => \Drupal::url('locale.translate_status'))),
         );
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 01a0b8e710f830aa82914c3712aa83d193a180d2..d2db127685f2fa88cd804f35570863a2f504112f 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -594,13 +594,13 @@ function locale_form_language_admin_overview_form_alter(&$form, FormStateInterfa
     );
     if (!$language->locked && ($langcode != 'en' || locale_translate_english())) {
       $form['languages'][$langcode]['locale_statistics'] = array(
-        '#markup' => l(
+        '#markup' => \Drupal::l(
           t('@translated/@total (@ratio%)', array(
             '@translated' => $stats[$langcode]['translated'],
             '@total' => $total_strings,
             '@ratio' => $stats[$langcode]['ratio'],
           )),
-          'admin/config/regional/translate',
+          'locale.translate_page', array(),
           array('query' => array('langcode' => $langcode))
         ),
       );
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index dd88364b8af8fc1659be270099e6cdf4210cf842..d76a741fd980a7852d8d4ff75ce75b9711454066 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -157,5 +157,5 @@ function template_preprocess_locale_translation_last_check(&$variables) {
   $last = $variables['last'];
   $variables['last_checked'] = ($last != NULL);
   $variables['time'] = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $last);
-  $variables['link'] = l(t('Check manually'), 'admin/reports/translations/check', array('query' => drupal_get_destination()));
+  $variables['link'] = \Drupal::l(t('Check manually'), 'locale.check_translation', array(), array('query' => drupal_get_destination()));
 }
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index b0a806d1f5a422a0087a575997449c6e7a073c5c..e6b955e1a71e11707936cabab372305713b3a0a9 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -128,7 +128,7 @@ function _node_mass_update_batch_process(array $nodes, array $updates, $load, $r
     $node = _node_mass_update_helper($node, $updates);
 
     // Store result for post-processing in the finished callback.
-    $context['results'][] = l($node->label(), 'node/' . $node->id());
+    $context['results'][] = \Drupal::linkGenerator()->generateFromUrl($node->label(), $node->urlInfo());
 
     // Update our progress information.
     $context['sandbox']['progress']++;
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index be6d938b502bb8b2d33867ed09aa33d3cdd5c58e..fbe4313c3862bb928f6dfe9c3a72eb3d5da1abf6 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -32,7 +32,7 @@ function node_requirements($phase) {
       'value' => $value,
       // The result of t() is safe and so is the result of l(). Preserving
       // safe object.
-      'description' => SafeMarkup::set($description . ' ' . l(t('Rebuild permissions'), 'admin/reports/status/rebuild')),
+      'description' => SafeMarkup::set($description . ' ' . \Drupal::l(t('Rebuild permissions'), 'node.configure_rebuild_confirm')),
     );
   }
   return $requirements;
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 091d6018a28d546fc275b958c82aa7be6c1ec137..c22e92ee4c4ac33f44fc24f5755947795bbee6a0 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -16,6 +16,7 @@
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
 use Symfony\Component\HttpFoundation\Response;
+use Drupal\Core\Database\StatementInterface;
 use Drupal\Core\Database\Query\AlterableInterface;
 use Drupal\Core\Database\Query\SelectInterface;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -185,7 +186,7 @@ function node_entity_view_display_alter(EntityViewDisplayInterface $display, $co
 /**
  * Gathers a listing of links to nodes.
  *
- * @param $result
+ * @param \Drupal\Core\Database\StatementInterface $result
  *   A database result object from a query to fetch node entities. If your
  *   query joins the {comment_entity_statistics} table so that the comment_count
  *   field is available, a title attribute will be added to show the number of
@@ -197,12 +198,14 @@ function node_entity_view_display_alter(EntityViewDisplayInterface $display, $co
  *   A renderable array containing a list of linked node titles fetched from
  *   $result, or FALSE if there are no rows in $result.
  */
-function node_title_list($result, $title = NULL) {
+function node_title_list(StatementInterface $result, $title = NULL) {
   $items = array();
   $num_rows = FALSE;
-  foreach ($result as $node) {
-    // Do not use $node->label() here, because $node comes from the database.
-    $items[] = l($node->title, 'node/' . $node->nid, !empty($node->comment_count) ? array('attributes' => array('title' => format_plural($node->comment_count, '1 comment', '@count comments'))) : array());
+  foreach ($result as $row) {
+    // Do not use $node->label() or $node->urlInfo() here, because we only have
+    // database rows, not actual nodes.
+    $options = !empty($row->comment_count) ? array('attributes' => array('title' => format_plural($row->comment_count, '1 comment', '@count comments'))) : array();
+    $items[] = \Drupal::linkGenerator()->generate($row->title, 'entity.node.canonical', ['node' => $row->nid], $options);
     $num_rows = TRUE;
   }
 
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc
index 517a5d5e9faab6eb3f12c02da182542bb7212978..a7d77698854b621be3954eecf4cd80a82dde7b51 100644
--- a/core/modules/node/node.pages.inc
+++ b/core/modules/node/node.pages.inc
@@ -31,7 +31,7 @@ function template_preprocess_node_add_list(&$variables) {
     foreach ($variables['content'] as $type) {
       $variables['types'][$type->type] = array(
         'type' => $type->type,
-        'add_link' => l($type->name, 'node/add/' . $type->type),
+        'add_link' => \Drupal::l($type->name, 'node.add', array('node_type' => $type->type)),
         'description' => Xss::filterAdmin($type->description),
       );
     }
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index 45343d5500671f659694ad659c31d5a98bb5e7a5..a3c484fbc594fa51a3e3efe478e3d711331909ff 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -408,7 +408,7 @@ public function save(array $form, FormStateInterface $form_state) {
     $node = $this->entity;
     $insert = $node->isNew();
     $node->save();
-    $node_link = l(t('View'), 'node/' . $node->id());
+    $node_link =  $this->getLinkGenerator()->generateFromUrl(t('View'), $node->urlInfo());
     $context = array('@type' => $node->getType(), '%title' => $node->label(), 'link' => $node_link);
     $t_args = array('@type' => node_get_type_label($node), '%title' => $node->label());
 
diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php
index e60ee828a31156b5d60c915fb069a6f1508ba062..e99d8604cdf9a09748f3186d9ed33e3a60b9a060 100644
--- a/core/modules/node/src/NodeTypeForm.php
+++ b/core/modules/node/src/NodeTypeForm.php
@@ -230,7 +230,7 @@ public function save(array $form, FormStateInterface $form_state) {
     }
     elseif ($status == SAVED_NEW) {
       drupal_set_message(t('The content type %name has been added.', $t_args));
-      $context = array_merge($t_args, array('link' => l(t('View'), 'admin/structure/types')));
+      $context = array_merge($t_args, array('link' => \Drupal::l(t('View'), 'node.overview_types')));
       $this->logger('node')->notice('Added content type %name.', $context);
     }
 
diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
index 44dab9b65273f030c30304d047dc6bfb2a1c409a..9759544d96ba32c7e4b80a44233fce627d679883 100644
--- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
@@ -115,7 +115,7 @@ public function _testResponsiveImageFieldFormatters($scheme) {
       '#width' => 40,
       '#height' => 20,
     );
-    $default_output = l($image, file_create_url($image_uri), array('html' => TRUE));
+    $default_output = '<a href="' . file_create_url($image_uri) . '">' . drupal_render($image) . '</a>';
     $this->drupalGet('node/' . $nid);
     $cache_tags_header = $this->drupalGetHeader('X-Drupal-Cache-Tags');
     $this->assertTrue(!preg_match('/ image_style\:/', $cache_tags_header), 'No image style cache tag found.');
diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
index 2f554c445895217b7e5630e0933edef0aa93250c..fde250aae8555d5a6f8b026c2ada44636e555e7b 100644
--- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
@@ -48,7 +48,7 @@ protected function setUp() {
     // Link the node to itself to test that it's only indexed once. The content
     // also needs the word "pizza" so we can use it as the search keyword.
     $body_key = 'body[0][value]';
-    $edit[$body_key] = l($node->label(), 'node/' . $node->id()) . ' pizza sandwich';
+    $edit[$body_key] = \Drupal::linkGenerator()->generateFromUrl($node->label(), $node->urlInfo()) . ' pizza sandwich';
     $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
 
     $this->container->get('plugin.manager.search')->createInstance('node_search')->updateIndex();
diff --git a/core/modules/search/src/Tests/SearchRankingTest.php b/core/modules/search/src/Tests/SearchRankingTest.php
index eb9d9a0b06de3d8bf9c482d4899505ed7f294a38..c3c1c25c7ecd9942badad08a473e825c02f5df20 100644
--- a/core/modules/search/src/Tests/SearchRankingTest.php
+++ b/core/modules/search/src/Tests/SearchRankingTest.php
@@ -218,7 +218,7 @@ public function testHTMLRankings() {
     foreach ($shuffled_tags as $tag) {
       switch ($tag) {
         case 'a':
-          $settings['body'] = array(array('value' => l('Drupal Rocks', 'node'), 'format' => 'full_html'));
+          $settings['body'] = array(array('value' => \Drupal::l('Drupal Rocks', '<front>'), 'format' => 'full_html'));
           break;
         case 'notag':
           $settings['body'] = array(array('value' => 'Drupal Rocks'));
diff --git a/core/modules/shortcut/src/Form/SetCustomize.php b/core/modules/shortcut/src/Form/SetCustomize.php
index 536828d13837da26d503d29c3c0c0665dee8eeb6..89ddf4e256274a68b72ec35c3c72c2fe31d56fe0 100644
--- a/core/modules/shortcut/src/Form/SetCustomize.php
+++ b/core/modules/shortcut/src/Form/SetCustomize.php
@@ -52,7 +52,7 @@ public function form(array $form, FormStateInterface $form_state) {
     foreach ($this->entity->getShortcuts() as $shortcut) {
       $id = $shortcut->id();
       $form['shortcuts']['links'][$id]['#attributes']['class'][] = 'draggable';
-      $form['shortcuts']['links'][$id]['name']['#markup'] = l($shortcut->getTitle(), $shortcut->path->value);
+      $form['shortcuts']['links'][$id]['name']['#markup'] = $this->getLinkGenerator()->generateFromUrl($shortcut->getTitle(), $shortcut->getUrl());
       $form['shortcuts']['links'][$id]['#weight'] = $shortcut->getWeight();
       $form['shortcuts']['links'][$id]['weight'] = array(
         '#type' => 'weight',
diff --git a/core/modules/statistics/src/Tests/StatisticsReportsTest.php b/core/modules/statistics/src/Tests/StatisticsReportsTest.php
index 520e6a430cccf9c368563f1c521fb3eb23fcddc8..91b5fa466537dc04d19a85f64fe09c18a167a8a6 100644
--- a/core/modules/statistics/src/Tests/StatisticsReportsTest.php
+++ b/core/modules/statistics/src/Tests/StatisticsReportsTest.php
@@ -49,7 +49,7 @@ function testPopularContentBlock() {
     $this->assertText('All time', 'Found the all time popular content.');
     $this->assertText('Last viewed', 'Found the last viewed popular content.');
 
-    $this->assertRaw(l($node->label(), 'node/' . $node->id()), 'Found link to visited node.');
+    $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($node->label(), $node->urlInfo()), 'Found link to visited node.');
   }
 
 }
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index 7e4927b68f2b526f42d4346cedea2f5340202327..3c80cd83ae1f22e22e6da530559867ddfbcd2439 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -146,41 +146,6 @@ function statistics_get($nid) {
   }
 }
 
-/**
- * Generates a link to a path, truncating the displayed text to a given width.
- *
- * @param string $path
- *   The path to generate the link for.
- * @param int $width
- *   The width to set the displayed text of the path.
- *
- * @return string
- *   A string as a link, truncated to the width, linked to the given $path.
- */
-function _statistics_link($path, $width = 35) {
-  $title = \Drupal::service('path.alias_manager')->getAliasByPath($path);
-  $title = truncate_utf8($title, $width, FALSE, TRUE);
-  return l($title, $path);
-}
-
-/**
- * Formats an item for display, including both the item title and the link.
- *
- * @param string $title
- *   The text to link to a path; will be truncated to a maximum width of 35.
- * @param string $path
- *   The path to link to; will default to '/'.
- *
- * @return string
- *   An HTML string with $title linked to the $path.
- */
-function _statistics_format_item($title, $path) {
-  $path = ($path ? $path : '/');
-  $output  = ($title ? "$title<br />" : '');
-  $output .= _statistics_link($path);
-  return $output;
-}
-
 /**
  * Implements hook_ENTITY_TYPE_predelete() for node entities.
  */
diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module
index 85a7311a6a53a466f48bbe20f072abd234c10c0a..3124b5037e77d4c7015743b21770b6b352b42ff0 100644
--- a/core/modules/syslog/syslog.module
+++ b/core/modules/syslog/syslog.module
@@ -33,7 +33,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) {
  */
 function syslog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) {
   $config = \Drupal::config('syslog.settings');
-  $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . l(t('More information'), 'admin/help/syslog') . '.' : NULL;
+  $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . \Drupal::l(t('More information'), 'help.page', ['name' => 'syslog']) . '.' : NULL;
   $form['syslog_identity'] = array(
     '#type'          => 'textfield',
     '#title'         => t('Syslog identity'),
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index f1c9b23233c30a3f1cc45b17f328697a8ad3c0bd..ebe1b15c2cb8d8717cbab5d7736b934a635bd467 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1565,7 +1565,7 @@ function hook_requirements($phase) {
   // Test PHP version
   $requirements['php'] = array(
     'title' => t('PHP'),
-    'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
+    'value' => ($phase == 'runtime') ? \Drupal::l(phpversion(), 'system.php') : phpversion(),
   );
   if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
     $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 041e04f5eb9c9632c5ecaabbebb5f1dc1eb7e1fe..4d3ba7e510c4900a245ade4d19896d2c1ee76476 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -59,7 +59,7 @@ function system_requirements($phase) {
     $requirements['php'] = array(
       'title' => t('PHP'),
       // $phpversion is safe and output of l() is safe, so this value is safe.
-      'value' => SafeMarkup::set(($phase == 'runtime') ? $phpversion . ' (' . l(t('more information'), 'admin/reports/status/php') . ')' : $phpversion),
+      'value' => SafeMarkup::set(($phase == 'runtime') ? $phpversion . ' (' . \Drupal::l(t('more information'), 'system.php') . ')' : $phpversion),
     );
   }
   else {
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index c863fdd255f4f603b4aab25e54ff51ea464dd3f4..3f19f14d3be213b02d3a3746c29f1b02b057fc44 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -1175,10 +1175,10 @@ function system_time_zones($blank = NULL) {
 function theme_system_compact_link() {
   $output = '<div class="compact-link">';
   if (system_admin_compact_mode()) {
-    $output .= l(t('Show descriptions'), 'admin/compact/off', array('attributes' => array('title' => t('Expand layout to include descriptions.')), 'query' => drupal_get_destination()));
+    $output .= \Drupal::l(t('Show descriptions'), 'system.admin_compact_page', array('mode' => 'off'), array('attributes' => array('title' => t('Expand layout to include descriptions.')), 'query' => drupal_get_destination()));
   }
   else {
-    $output .= l(t('Hide descriptions'), 'admin/compact/on', array('attributes' => array('title' => t('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination()));
+    $output .= \Drupal::l(t('Hide descriptions'), 'system.admin_compact_page', array('mode' => 'on'), array('attributes' => array('title' => t('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination()));
   }
   $output .= '</div>';
 
diff --git a/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
index 53cd3234c0e364492af29dc9e66e242f39d36db6..4a9820704f8846a2258450fed8a131b1e547fcd1 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
@@ -68,7 +68,7 @@ public function render(ResultRow $values) {
       ));
       if ($term->access('update')) {
         $text = !empty($this->options['text']) ? $this->options['text'] : $this->t('Edit');
-        return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination()));
+        return \Drupal::l($text, 'entity.taxonomy.edit_form', ['taxonomy_term' => $tid], array('query' => drupal_get_destination()));
       }
     }
   }
diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php
index 2fa6f4b4427fecea473da6cf82b56a944ed4c907..39ebb01a5c2dd96ecaed2ffc5e8f9d664006f1e4 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -134,14 +134,17 @@ public function buildEntity(array $form, FormStateInterface $form_state) {
   public function save(array $form, FormStateInterface $form_state) {
     $term = $this->entity;
 
-    switch ($term->save()) {
+    $result = $term->save();
+
+    $link = $this->getLinkGenerator()->generateFromUrl($this->t('Edit'), $term->urlInfo('edit-form'));
+    switch ($result) {
       case SAVED_NEW:
         drupal_set_message($this->t('Created new term %term.', array('%term' => $term->getName())));
-        $this->logger('taxonomy')->notice('Created new term %term.', array('%term' => $term->getName(), 'link' => l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit')));
+        $this->logger('taxonomy')->notice('Created new term %term.', array('%term' => $term->getName(), 'link' => $link));
         break;
       case SAVED_UPDATED:
         drupal_set_message($this->t('Updated term %term.', array('%term' => $term->getName())));
-        $this->logger('taxonomy')->notice('Updated term %term.', array('%term' => $term->getName(), 'link' => l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit')));
+        $this->logger('taxonomy')->notice('Updated term %term.', array('%term' => $term->getName(), 'link' => $link));
         break;
     }
 
diff --git a/core/modules/taxonomy/src/Tests/TermIndexTest.php b/core/modules/taxonomy/src/Tests/TermIndexTest.php
index 54d0dfb4863826e902480e365a1108a9b228aa09..8ad3968e9b338e922f61bfb2e364df66abcc50bf 100644
--- a/core/modules/taxonomy/src/Tests/TermIndexTest.php
+++ b/core/modules/taxonomy/src/Tests/TermIndexTest.php
@@ -217,6 +217,6 @@ function testTaxonomyTermHierarchyBreadcrumbs() {
 
     // Verify that the page breadcrumbs include a link to the parent term.
     $this->drupalGet('taxonomy/term/' . $term1->id());
-    $this->assertRaw(l($term2->getName(), 'taxonomy/term/' . $term2->id()), 'Parent term link is displayed when viewing the node.');
+    $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($term2->getName(), $term2->urlInfo()), 'Parent term link is displayed when viewing the node.');
   }
 }
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
index 03b29798887793d800ca727c80f7e8363414c219..29f6f3bbb7178d3f26c36acf4baa151f3b14adb1 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
@@ -28,7 +28,7 @@ function testViewsHandlerTidField() {
     $this->executeView($view);
 
     $actual = $view->field['name']->advancedRender($view->result[0]);
-    $expected = l($this->term1->label(), $this->term1->getSystemPath());
+    $expected = \Drupal::linkGenerator()->generateFromUrl($this->term1->label(), $this->term1->urlInfo());
 
     $this->assertEqual($expected, $actual);
   }
diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
index bc2ce9989dd1b6f99d6ddc6cf7e10d9c33293552..d167f92aeb6a3c3f9eb42309c34358de4691168b 100644
--- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
+++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
@@ -32,9 +32,9 @@ function toolbar_test_toolbar() {
       'content' => array(
         '#theme' => 'item_list',
         '#items' => array(
-          l(t('link 1'), '<front>', array('attributes' => array('title' => 'Test link 1 title'))),
-          l(t('link 2'), '<front>', array('attributes' => array('title' => 'Test link 2 title'))),
-          l(t('link 3'), '<front>', array('attributes' => array('title' => 'Test link 3 title'))),
+          \Drupal::l(t('link 1'), '<front>', [], array('attributes' => array('title' => 'Test link 1 title'))),
+          \Drupal::l(t('link 2'), '<front>', [], array('attributes' => array('title' => 'Test link 2 title'))),
+          \Drupal::l(t('link 3'), '<front>', [], array('attributes' => array('title' => 'Test link 3 title'))),
         ),
         '#attributes' => array(
           'class' => array('menu'),
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index a88b75451654d71250e36dc9f2848149965f6327..f68cad7c561dc1b24b2a4e5c7fb45d12b4dfadad 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -74,7 +74,7 @@ function tracker_page($account = NULL) {
 
         if ($new = \Drupal::service('comment.manager')->getCountNewComments($node)) {
           $comments .= '<br />';
-          $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->id(), array('fragment' => 'new'));
+          $comments .= \Drupal::linkGenerator()->generateFromUrl(format_plural($new, '1 new', '@count new'), $node->urlInfo()->setOptions(array('fragment' => 'new')));
         }
       }
 
@@ -85,7 +85,7 @@ function tracker_page($account = NULL) {
 
       $row = array(
         'type' => String::checkPlain(node_get_type_label($node)),
-        'title' => array('data' => l($node->getTitle(), 'node/' . $node->id()) . ' ' . drupal_render($mark_build)),
+        'title' => array('data' => \Drupal::linkGenerator()->generateFromUrl($node->getTitle(), $node->urlInfo()) . ' ' . drupal_render($mark_build)),
         'author' => array('data' => array('#theme' => 'username', '#account' => $node->getOwner())),
         'replies' => array('class' => array('replies'), 'data' => $comments),
         'last updated' => array('data' => t('!time ago', array('!time' => \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->last_activity)))),
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index 7997ec87d090e3dc0a9390f47cae18e5ca4543d9..fa04937b7a9bbeced8e7308e4d50fd84112ff08c 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -134,6 +134,6 @@ function _update_requirement_check($project, $type) {
   if ($status != UPDATE_CURRENT && $type == 'core' && isset($project['recommended'])) {
     $requirement_label .= ' ' . t('(version @version available)', array('@version' => $project['recommended']));
   }
-  $requirement['value'] = l($requirement_label, update_manager_access() ? 'admin/reports/updates/update' : 'admin/reports/updates');
+  $requirement['value'] = \Drupal::l($requirement_label, update_manager_access() ? 'update.report_update' : 'update.status');
   return $requirement;
 }
diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php
index 1b89bf5f9601334a45c41f918d8fc2d450357a07..57b29f443ab8e7f40d2fe35ec07731b09fa911db 100644
--- a/core/modules/user/src/AccountForm.php
+++ b/core/modules/user/src/AccountForm.php
@@ -132,7 +132,7 @@ public function form(array $form, FormStateInterface $form_state) {
       if (!$pass_reset) {
         $protected_values['mail'] = $form['account']['mail']['#title'];
         $protected_values['pass'] = $this->t('Password');
-        $request_new = l($this->t('Request new password'), 'user/password', array('attributes' => array('title' => $this->t('Request new password via email.'))));
+        $request_new = \Drupal::l($this->t('Request new password'), 'user.pass', array(), array('attributes' => array('title' => $this->t('Request new password via email.'))));
         $current_pass_description = $this->t('Required if you want to change the %mail or %pass below. !request_new.', array('%mail' => $protected_values['mail'], '%pass' => $protected_values['pass'], '!request_new' => $request_new));
       }
 
diff --git a/core/modules/user/src/Plugin/Block/UserLoginBlock.php b/core/modules/user/src/Plugin/Block/UserLoginBlock.php
index 7b3727dbcf06941e4725e74d578b270bf95594d4..d93ee2f944d8a9c35afd0670ee06ebc4f41b2b9b 100644
--- a/core/modules/user/src/Plugin/Block/UserLoginBlock.php
+++ b/core/modules/user/src/Plugin/Block/UserLoginBlock.php
@@ -44,14 +44,14 @@ public function build() {
     // Build action links.
     $items = array();
     if (\Drupal::config('user.settings')->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY) {
-      $items['create_account'] = l(t('Create new account'), 'user/register', array(
+      $items['create_account'] = \Drupal::l(t('Create new account'), 'user.register', array(), array(
         'attributes' => array(
           'title' => t('Create a new user account.'),
           'class' => array('create-account-link'),
         ),
       ));
     }
-    $items['request_password'] = l(t('Request new password'), 'user/password', array(
+    $items['request_password'] = \Drupal::l(t('Request new password'), 'user.pass', array(), array(
       'attributes' => array(
         'title' => t('Request new password via email.'),
         'class' => array('request-password-link'),
diff --git a/core/modules/user/src/RegisterForm.php b/core/modules/user/src/RegisterForm.php
index 9ca0c95b843db21b6d44898fe2b6a98666559bef..fbf09003e5654ec1fee438d3be5a7b040ddd9abd 100644
--- a/core/modules/user/src/RegisterForm.php
+++ b/core/modules/user/src/RegisterForm.php
@@ -115,7 +115,7 @@ public function save(array $form, FormStateInterface $form_state) {
     $form_state->set('user', $account);
     $form_state->setValue('uid', $account->id());
 
-    $this->logger('user')->notice('New user: %name %email.', array('%name' => $form_state->getValue('name'), '%email' => '<' . $form_state->getValue('mail') . '>', 'type' => l($this->t('Edit'), 'user/' . $account->id() . '/edit')));
+    $this->logger('user')->notice('New user: %name %email.', array('%name' => $form_state->getValue('name'), '%email' => '<' . $form_state->getValue('mail') . '>', 'type' => \Drupal::l($this->t('Edit'), 'entity.user.edit_form', array('user' => $account->id()))));
 
     // Add plain text password into user account to generate mail tokens.
     $account->password = $pass;
diff --git a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
index df01adcdcbadbfe0ba3dcb73153f8b6eaa744643..e242a07946f380ec8d85d2cf0b1ab040ce45efa7 100644
--- a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
+++ b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
@@ -79,6 +79,10 @@ function testUserEditForm() {
     // Install default configuration; required for AccountFormController.
     $this->installConfig(array('user'));
 
+    // Install the router table and then rebuild.
+    $this->installSchema('system', ['router']);
+    \Drupal::service('router.builder')->rebuild();
+
     $form = $this->buildAccountForm('default');
 
     // Verify name and pass field order.
diff --git a/core/modules/user/src/Tests/UserAdminTest.php b/core/modules/user/src/Tests/UserAdminTest.php
index 1d236c4293dd2244493e427b4456412a03941211..3b18295f55964cccfdf7a35cd04efeae42b0a405 100644
--- a/core/modules/user/src/Tests/UserAdminTest.php
+++ b/core/modules/user/src/Tests/UserAdminTest.php
@@ -52,6 +52,8 @@ function testUserAdmin() {
     $this->assertText($admin_user->getUsername(), 'Found Admin user on admin users page');
 
     // Test for existence of edit link in table.
+    // @todo This cannot be converted to \Drupal::l() until
+    //   https://www.drupal.org/node/2345725 is resolved.
     $link = l(t('Edit'), "user/" . $user_a->id() . "/edit", array('query' => array('destination' => 'admin/people')));
     $this->assertRaw($link, 'Found user A edit link on admin users page');
 
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 2d4211746b91919f5ae5c9277fd6d58651e830ca..5348df19f0cacf7ce707e239a939e0bcf1389d50 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -1034,7 +1034,7 @@ public function optionLink($text, $section, $class = '', $title = '') {
       $title = $text;
     }
 
-    return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage->id() . '/' . $this->display['id'] . '/' . $section, array('attributes' => array('class' => array('views-ajax-link', $class), 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE));
+    return \Drupal::l($text, 'views_ui.form_display', ['js' => 'nojs', 'view' => $this->view->storage->id(), 'display_id' => $this->display['id'], 'type' => $section], array('attributes' => array('class' => array('views-ajax-link', $class), 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE));
   }
 
   /**
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index 3466e55a8c0da8e06b36d0016bdb725d55897ff4..c6f0c1e010e1a7451ec521284a86e54d1c749427 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -13,6 +13,7 @@
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
 use Drupal\views\Plugin\views\HandlerBase;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\ResultRow;
diff --git a/core/modules/views/src/Tests/DefaultViewsTest.php b/core/modules/views/src/Tests/DefaultViewsTest.php
index 301fc2c5a0a2c7d88191b157dc8b2b6f61a0153e..c02e6e86fceb0ea57be5c8a76791cbd4096ecf9a 100644
--- a/core/modules/views/src/Tests/DefaultViewsTest.php
+++ b/core/modules/views/src/Tests/DefaultViewsTest.php
@@ -94,7 +94,7 @@ protected function setUp() {
       if ($i % 2) {
         $values['promote'] = TRUE;
       }
-      $values['body'][]['value'] = l('Node ' . 1, 'node/' . 1);
+      $values['body'][]['value'] = \Drupal::l('Node ' . 1, 'entity.node.canonical', ['node' => 1]);
 
       $node = $this->drupalCreateNode($values);
 
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index eda64cc6b35412b11cdd62fa1c003f12af45f361..12083cfd8f46f73df4726df06889cf6e76774a2b 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -1062,7 +1062,13 @@ public function getFormBucket(ViewUI $view, $type, $display) {
       if ($handler->broken()) {
         $build['fields'][$id]['#class'][] = 'broken';
         $field_name = $handler->adminLabel();
-        $build['fields'][$id]['#link'] = l($field_name, "admin/structure/views/nojs/handler/{$view->id()}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
+        $build['fields'][$id]['#link'] = \Drupal::l($field_name, 'views_ui.form_handler', array(
+          'js' => 'nojs',
+          'view' => $view->id(),
+          'display_id' => $display['id'],
+          'type' => $type,
+          'id' => $id,
+        ), array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
         continue;
       }
 
@@ -1079,15 +1085,33 @@ public function getFormBucket(ViewUI $view, $type, $display) {
         // Add a [hidden] marker, if the field is excluded.
         $link_text .= ' [' . $this->t('hidden') . ']';
       }
-      $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/handler/{$view->id()}/{$display['id']}/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE));
+      $build['fields'][$id]['#link'] = \Drupal::l($link_text, 'views_ui.form_handler', array(
+        'js' => 'nojs',
+        'view' => $view->id(),
+        'display_id' => $display['id'],
+        'type' => $type,
+        'id' => $id,
+      ), array('attributes' => $link_attributes, 'html' => TRUE));
       $build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display['id']. '-' . $type . '-' . $id);
 
       if ($executable->display_handler->useGroupBy() && $handler->usesGroupBy()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . $this->t('Aggregation settings') . '</span>', "admin/structure/views/nojs/handler-group/{$view->id()}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => $this->t('Aggregation settings')), 'html' => TRUE));
+        $build['fields'][$id]['#settings_links'][] = \Drupal::l('<span class="label">' . $this->t('Aggregation settings') . '</span>', 'views_ui.form_handler_group', array(
+          'js' => 'nojs',
+          'view' => $view->id(),
+          'display_id' => $display['id'],
+          'type' => $type,
+          'id' => $id,
+        ), array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => $this->t('Aggregation settings')), 'html' => TRUE));
       }
 
       if ($handler->hasExtraOptions()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . $this->t('Settings') . '</span>', "admin/structure/views/nojs/handler-extra/{$view->id()}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => $this->t('Settings')), 'html' => TRUE));
+        $build['fields'][$id]['#settings_links'][] = \Drupal::l('<span class="label">' . $this->t('Settings') . '</span>', 'views_ui.form_handler_extra', array(
+          'js' => 'nojs',
+          'view' => $view->id(),
+          'display_id' => $display['id'],
+          'type' => $type,
+          'id' => $id,
+        ), array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => $this->t('Settings')), 'html' => TRUE));
       }
 
       if ($grouping) {